﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectSell
{
    public partial class DangNhap : System.Web.UI.Page
    {
        private DataObject dao = new DataObject();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
            
            }
        }

        protected void btnDangNhap_Click(object sender, EventArgs e)
        {
            string tenDN = txtTenDangNhap.Text;
            string matKhau = txtMatKhau.Text;
            bool result = dao.DangNhap(tenDN,matKhau);
            if (result)
            {
                Session["DN"] = "DN";
                //Server.Transfer("~/Admin.aspx?DN = true");
                Response.Redirect("~/Admin.aspx");
            }
            if (!result)
            {
                Response.Redirect("~/BauVatVTCGame.aspx");
            }
        }
    }
}